package com.maxd.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 教官信息
 */
@Entity
@Getter
@Setter
@ApiModel("教官信息")
@Table(name = "instructor_info")
@DynamicInsert
@DynamicUpdate
public class InstructorInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @ApiModelProperty("自增主键")
    @Column(name = "id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ApiModelProperty("合伙人ID")
    @Column(name = "partner_id", nullable = false)
    private Long partnerId;

    @ApiModelProperty("姓名")
    @Column(name = "name", nullable = false)
    @NotNull(message = "姓名不能为空")
    private String name;

    @ApiModelProperty("简介")
    @Column(name = "introduction", nullable = false)
    @NotNull(message = "简介不能为空")
    private String introduction;

    @ApiModelProperty("经验(年)")
    @Column(name = "experience_years", nullable = false)
    @NotNull(message = "经验不能为空")
    private Integer experienceYears;

    @ApiModelProperty("评分")
    @Column(name = "score")
    private BigDecimal score;

    @ApiModelProperty("评价人数")
    @Column(name = "evaluate_count")
    private Integer evaluateCount;

    @ApiModelProperty("封面图片")
    @Column(name = "cover_img", nullable = false)
    @NotNull(message = "封面图片不能为空")
    private String coverImg;

    @Column(name = "details")
    @ApiModelProperty("详细信息")
    private String details;

    @ApiModelProperty("创建时间")
    @Column(name = "create_time", nullable = false)
    private Date createTime;

    @ApiModelProperty("更新时间")
    @Column(name = "update_time", nullable = false)
    private Date updateTime;

    @ApiModelProperty("创建人")
    @Column(name = "create_by")
    private String createBy;

    @ApiModelProperty("更新人")
    @Column(name = "update_by")
    private String updateBy;
}
